package com.example.demo.modules.customDefine.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.modules.customDefine.entity.ModuleFieldData;
import com.example.demo.modules.customDefine.mapper.ModuleFieldDataMapper;
import com.example.demo.modules.customDefine.service.ModuleFieldDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ModuleFieldDataServiceImpl extends ServiceImpl<ModuleFieldDataMapper, ModuleFieldData> implements ModuleFieldDataService {

    @Autowired
    private ModuleFieldDataMapper moduleFieldDataMapper;

    //查询所有
    @Override
    public List<ModuleFieldData> listAll() {
        List<ModuleFieldData> moduleFieldDatas = this.list();
        return moduleFieldDatas;
    }

    //条件查询
        @Override
    public ModuleFieldData listOne(Long id) {
        ModuleFieldData moduleFieldData = this.getById(id);
        return moduleFieldData;
    }

    //保存
        @Override
    public int insert(ModuleFieldData moduleFieldData){
        return moduleFieldDataMapper.insert(moduleFieldData);

    }

}
